// import { Notification } from "element-ui";
import { Message } from "element-ui";

export default {
  Messages(val, type) {
    if (document.getElementsByClassName("el-message").length <= 1) {
      if (type !== "error") {
        Message({
          type: type,
          message: val
        });
      } else {
        Message.error(val);
      }
    }
  }
};
